var showTitle = function(){
	return {
		_init : function(){
			
			showTitle._showRegister();
			
		},
		_showRegister: function(){
			$(document).on("click",".showTitle",function(){
				var pkId =$(this).data("id");
				debugger;
				$.ajax({
					url : ctx + '/equipLifeCycle/malfunction/record/getRegisterRecord/get.mvc',
					type : "get",
					dataType : 'json',
					
					data : {pkId:pkId},
					success : function(response) {
						if (response.result == true) {
							
							$("#registerModal .status").val(response.data.status);
							$("#registerModal .factoryName").val(response.data.factoryName);
							$("#registerModal .lineName").val(response.data.lineName);
							$("#registerModal .areaName").val(response.data.areaName);
							$("#registerModal .dutyUser").val(response.data.dutyUser);
							$("#registerModal .ifStop").val(response.data.ifStop);
							$("#registerModal .failureLevel").val(response.data.failureLevel);
							$("#registerModal .equipCode").val(response.data.equipCode);
							$("#registerModal .equipName").val(response.data.equipName);
							$("#registerModal .shopName").val(response.data.shopName);
							$("#registerModal .reportMan").val(response.data.reportMan);
							$("#registerModal .happenDate").val(response.data.happenDate);
							$("#registerModal .failureShortName").val(response.data.failureShortName);
							$("#registerModal .failureDesc").val(response.data.failureDesc);
							if(response.data.filePath != ""){
								$("#registerModal .fileDown").data("src","/"+response.data.filePath);
							}
							
//							$("#registerModal .reportMan").val(response.data.reportMan);
							
							
							
							$("#registerModal").modal();
							
						}else{
							DialogUtil.warning(response.message);
						}
					},
					error : function(XMLHttpRequest, textStatus, errorThrown) {
						alert("系统错误");
					}
				});
				
			});
			
			$(document).on("click",".fileDown",function(){
				
				if($(this).data("src") == "" || typeof($(this).data("src")) == "undefined"){
					DialogUtil.warning("无文件");
					return false;
				}
				window.location.href=$(this).data("src");
			});
			
		}
		
		
		
	}
}();

